/*-
 *******************************************************************************
 * Copyright (c) 2011, 2016 Diamond Light Source Ltd.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Matthew Gerring - initial API and implementation and/or initial documentation
 *******************************************************************************/
package org.eclipse.scanning.api.malcolm;

import java.util.concurrent.TimeUnit;

import org.eclipse.scanning.api.event.scan.DeviceState;


public interface ILatchableDevice {

	/**
	 * Instruct the device to return once a given state is reached.
	 * @param time or less than 0 to wait infinitely (not recommended)
	 * @param unit
	 * @param ignoredStates
	 * @throws MalcolmDeviceException
	 */
	public DeviceState latch(long time, TimeUnit unit, DeviceState... ignoredStates) throws MalcolmDeviceException;
}
